//
//  ViewController.m
//  lessone
//
//  Created by apple on 16/9/13.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIButton *btn;
@property (weak, nonatomic) IBOutlet UILabel *label;
@property (weak, nonatomic) IBOutlet UISwitch *swi;
@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *av;
@property (weak, nonatomic) IBOutlet UISlider *Slider2;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}
- (IBAction)onClick:(id)sender {
    
    self.btn.backgroundColor =  [UIColor redColor];
    self.label.backgroundColor = [UIColor blueColor];
    
    if(_av.isAnimating)
    {
        [_av stopAnimating];
        
        
    }else{
        [_av startAnimating];
    }
}

- (IBAction)onChanged:(UISlider *)sender {
    
    _Slider2.value = sender.value;
}




- (IBAction)onClikr:(id)sender {
    
    if(self.btn.backgroundColor==[UIColor redColor] )
    {
        self.btn.backgroundColor = [UIColor grayColor];
        self.label.backgroundColor = [UIColor greenColor];
    }
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
